package com.zzx.project;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

//此类重写后的方法引用了启动类，为项目打war包而创建
public class SpringBootStartApplication extends SpringBootServletInitializer { //
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        //注意这里要指向原先用main方法执行的Application启动类
        //ProjectApplication为spring boot项目本身的启动类
        return builder.sources(ProjectApplication.class);
    }
}
